Below you will find a list of consecutively ordered paragraphs from a document and a list of aspects. Your task is to:

1. Read and understand the aspects
- Each aspect is identified by an Aspect ID (for example, "A0", "A1", etc.), includes a name, and has a description.
- Aspects describe themes, topics, or criteria that might be addressed in the paragraphs.

{% if reference_depth == "sentences" %}
2. Examine each paragraph and its sentences
- Each paragraph is identified by a paragraph ID (for example, "P0", "P1", etc.), optionally followed by additional information about the paragraph, which may be helpful during your analysis.
- Each paragraph includes sentences, each identified by a sentence ID (for example, "P0-S0", "P0-S1", etc.), followed by the full text of the sentence and, optionally, additional information about the sentence, which may be helpful during your analysis.
{% else %}
2. Examine each paragraph
- Each paragraph is identified by a paragraph ID (for example, "P0", "P1", etc.), followed by the full text of the paragraph and, optionally, additional information about the paragraph, which may be helpful during your analysis.
{% endif %}
- Note that paragraphs are listed in the same order they appear in the original document; therefore, context from surrounding paragraphs may influence whether a particular paragraph is relevant to an aspect.

{% if reference_depth == "sentences" %}
3. Map paragraphs and their sentences to aspects
{% else %}
3. Map paragraphs to aspects
{% endif %}
- A paragraph can address one, multiple, or none of the aspects.
{% if reference_depth == "sentences" %}
- A sentence within the paragraph can address one, multiple, or none of the aspects.
{% endif %}
{% if add_justifications %}
    {% if reference_depth == "sentences" %}
- If a paragraph clearly relates to an aspect (based on the aspect's name and description), include the paragraph's ID and the IDs of all the sentences within the paragraph that address or relate to the aspect. For each such sentence, also include a justification, detailing why the sentence is relevant to the aspect.
    {% else %}
- If a paragraph clearly relates to an aspect (based on the aspect's name and description), include the paragraph's ID and provide a justification, detailing why the paragraph is relevant to the aspect.
    {% endif %}
{% else %}
    {% if reference_depth == "sentences" %}
- If a paragraph clearly relates to an aspect (based on the aspect's name and description), include the paragraph's ID and the IDs of all the sentences within the paragraph that address or relate to the aspect.
    {% else %}
- If a paragraph clearly relates to an aspect (based on the aspect's name and description), include that paragraph's ID under the aspect's list of paragraph IDs.
    {% endif %}
{% endif %}
- If a paragraph does not relate to an aspect, do not include it under that aspect's list.

4. Produce the final answer in the specified JSON format
- Your output must be a JSON array of objects, each object corresponding to a single aspect.
- For each aspect (in the order they are provided), include:
    -- aspect_id: The aspect's unique identifier, e.g., "A0".
{% if add_justifications %}
    -- paragraphs: An array of objects for each paragraph that addresses or relates to the aspect. Each object should include:
        --- paragraph_id: The provided paragraph ID, e.g., "P0", "P2".
    {% if reference_depth == "sentences" %}
        --- sentences: An array of objects for each relevant sentence within the paragraph. Each object should include:
            ---- sentence_id: The provided ID of the sentence, e.g., "P0-S0", "P0-S2".
            ---- justification: A justification of why the sentence is relevant to the aspect. Ensure the justification is specific and directly ties the content of the sentence to the aspect's defining features. Never reference the sentence's ID in the justification.
        {% if justification_depth == "brief" %}
                ----- Justification should be brief, i.e. highlight only the essential details.
        {% elif justification_depth == "balanced" %}
                ----- Justification should be balanced, i.e. cover the key insights with enough detail to be informative, while remaining concise.
        {% elif justification_depth == "comprehensive" %}
                ----- Justification should be comprehensive, i.e. deliver an in-depth explanation that thoroughly details the rationale and supporting evidence.
        {% endif %}
                ----- Justification should be no longer than {{ justification_max_sents }} sentences.
        {% if output_language == "en" %}
                ----- Justification should be in English.
        {% elif output_language == "adapt" %}
                ----- Justification should be in the original language of the document.
        {% endif %}
    {% else %}
        --- justification: A justification of why the paragraph is relevant to the aspect. Ensure the justification is specific and directly ties the content of the paragraph to the aspect's defining features. Never reference the paragraph's ID in the justification.
        {% if justification_depth == "brief" %}
            ---- Justification should be brief, i.e. highlight only the essential details.
        {% elif justification_depth == "balanced" %}
            ---- Justification should be balanced, i.e. cover the key insights with enough detail to be informative, while remaining concise.
        {% elif justification_depth == "comprehensive" %}
            ---- Justification should be comprehensive, i.e. deliver an in-depth explanation that thoroughly details the rationale and supporting evidence.
        {% endif %}
            ---- Justification should be no longer than {{ justification_max_sents }} sentences.
        {% if output_language == "en" %}
            ---- Justification should be in English.
        {% elif output_language == "adapt" %}
            ---- Justification should be in the original language of the document.
        {% endif %}
    {% endif %}
    -- If an aspect has no related paragraphs, still include it with an empty paragraphs array ([]).
{% else %}
    {% if reference_depth == "sentences" %}
    -- paragraphs: An array of objects for each paragraph that addresses or relates to the aspect. Each object should include:
        --- paragraph_id: The provided paragraph ID, e.g., "P0", "P2".
        --- sentences: An array of objects for each relevant sentence within the paragraph. Each object should include:
            --- sentence_id: The provided ID of the sentence, e.g., "P0-S0", "P0-S2".
    {% else %}
    -- paragraph_ids: An array of the paragraph IDs that address or relate to the aspect, e.g., ["P0", "P2"].
    {% endif %}
    -- If an aspect has no related paragraphs, still include it with an empty paragraph_ids array ([]).
{% endif %}
- Do not add extra commentary, code block markers, or any other formatting beyond the JSON array.

Use the following answer format as a guide for your final answer (remember: no surrounding text or ```json delimiters should be included).

===
ANSWER FORMAT (MANDATORY):
{% if add_justifications %}
[
    {
        "aspect_id": str,
        "paragraphs: [
            {
                "paragraph_id": str,
    {% if reference_depth == "sentences" %}
                "sentences": [
                    {
                        "sentence_id": str,
                        "justification": str
                    },
                    ...
                ]
    {% else %}
                "justification": str
    {% endif %}
            },
            ...
        ],
    },
    ...
]
{% else %}
[
    {
        "aspect_id": str,
    {% if reference_depth == "sentences" %}
        "paragraphs: [
            {
                "paragraph_id": str,
                "sentences": [
                    {
                        "sentence_id": str,
                    },
                    ...
                ]
            },
            ...
        ]
    {% else %}
        "paragraph_ids: [
            str,
            ...
        ]
    {% endif %}
    },
    ...
]
{% endif %}
===

___
DOCUMENT ASPECTS:
{% for aspect_index, aspect_data in enumerate(aspects) %}
```
- Aspect ID: A{{ aspect_index }}
Aspect name: {{ aspect_data.name }}
Aspect description:
{{ aspect_data.description }}
```

{% endfor %}
___

---
{% if reference_depth == "sentences" %}
DOCUMENT PARAGRAPHS INCLUDING SENTENCES:
{% else %}
DOCUMENT PARAGRAPHS:
{% endif %}
{% for para_index, para_item in enumerate(paragraphs) %}
    {% set para_text = _clean_text_for_llm_prompt(para_item.raw_text, preserve_linebreaks=False) %}
    {% if para_text %}
'''
- Paragraph ID: P{{ para_index }}
        {% if reference_depth != "sentences" %}
Paragraph text: {{ para_text }}
        {% endif %}
        {% if para_item.additional_context %}
Additional information about the paragraph: {{ para_item.additional_context }}
        {% endif %}
        {% if reference_depth == "sentences" %}
Paragraph sentences:
            {% for sent_index, sent_item in enumerate(para_item.sentences) %}
                {% set sent_text = _clean_text_for_llm_prompt(sent_item.raw_text, preserve_linebreaks=False) %}
                {% if sent_text %}
    -- Sentence ID: P{{ para_index }}-S{{ sent_index }}
    Sentence text: {{ sent_text }}
                    {% if sent_item.additional_context %}
    Additional information about the sentence: {{ sent_item.additional_context }}
                    {% endif %}
                {% endif %}
            {% endfor %}
        {% endif %}
'''

    {% endif %}
{% endfor %}
---
